package com.chen.service;

import com.chen.domain.User;
import com.sun.org.apache.regexp.internal.RE;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @decription
 * @atuhor:陈红卫
 * @create : 2017-06-18-10:45
 */



/*
*
* value值为向服务注册中心注册过的服务名
* */
@FeignClient("hello-service")
public interface FeginConsumerHelloService {

    @RequestMapping("/hello")
    String hello();


    @RequestMapping(value = "/hello1",method = RequestMethod.GET)
    String hello(@RequestParam("name") String name);


    @RequestMapping(value = "/hello2",method = RequestMethod.GET)
    User hello(@RequestHeader("name") String name,@RequestHeader("age") Integer age);


    @RequestMapping(value="/hello3",method = RequestMethod.POST)
    String hello(@RequestBody User user);
}
